package cn.elricyu.tt.action.task;

import java.util.HashMap;
import java.util.Map;

public class MyTask {
	private Map<String, DayTask> taskMap = new HashMap<String, DayTask>();
	private int state;
	private DayTask taskdto = null;
	private int button;
	private boolean canrecive;
	private int imdonegold;

	public DayTask getDayTask(String key) {
		return taskMap.get(key);
	}

	public void addTask(DayTask task) {
		String key = task.getId();
		if (taskMap.containsKey(key)) {
			taskMap.put(key, task);
		}
	}

	public void deleteTask(DayTask task) {
		deleteTask(task.getId());
	}

	public void deleteTask(String id) {
		if (taskMap.containsKey(id)) {
			taskMap.remove(id);
		}
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public int getButton() {
		return button;
	}

	public void setButton(int button) {
		this.button = button;
	}

	public boolean isCanrecive() {
		return canrecive;
	}

	public void setCanrecive(boolean canrecive) {
		this.canrecive = canrecive;
	}

	public int getImdonegold() {
		return imdonegold;
	}

	public void setImdonegold(int imdonegold) {
		this.imdonegold = imdonegold;
	}

	public DayTask getTaskdto() {
		return taskdto;
	}

	public void setTaskdto(DayTask taskdto) {
		this.taskdto = taskdto;
	}

}
